<include file="Forum:header"/>
<body>
<div class="talk-wrap">
    <header id="index-header" class="talk-header">
        <div class="table-mode">
            <div class="table-cell"><img src="{BEESCRM:$forum['logo']}" class="talk-logo"></div>
            <div class="table-cell">
                <div class="talk-total">话题: {BEESCRM:$forum['post_num']}</div>
                <div class="talk-total">访问: {BEESCRM:$forum['click_num']}</div>
            </div>
            <div class="table-cell new-topic">
                <div id="launch"><span class="iconfont"></span>发话题</div>
            </div>
        </div>
    </header>
    <div class="talk-menu">
        <div class="menu-btn"><span class="icon-show"><span class="iconfont"></span></span></div>
        <dl class="menu-list">
            <dt>话题分类</dt>
            <dd><a href="{BEESCRM::U('base/forum/index',array('forum_id' => $forum_id))}" class="category-item">全部</a></dd>
            <volist name="category" id="vo">
            <dd><a href="{BEESCRM::U('base/forum/index',array('forum_id' => $forum_id, 'category_id' => $vo['category_id']))}" class="category-item">{BEESCRM:$vo['name']}</a></dd>
            </volist>
            <dd><a href="{BEESCRM::U('base/forum/index',array('forum_id' => $forum_id, 'type' => 'post'))}" class="category-item">我发出的</a></dd>
            <dd><a href="{BEESCRM::U('base/forum/index',array('forum_id' => $forum_id, 'type' => 'comment'))}" class="category-item">我评论的</a></dd>
        </dl>
    </div>

    <div id="index-main" class="talk-main" style="margin-top: 72px;">
    	<if condition="$preurl">
		<div class="loadmore">
			<a href="{BEESCRM:$preurl}" id="pre">点击查看上一页</a>
		</div>
		</if>
        <volist name="data" id="vo">
        <section class="talk-item">
            <a href="/base/forum/detail/forum_id/{BEESCRM:$forum_id}/post_id/{BEESCRM:$vo['post_id']}#{BEESCRM:$vo['post_id']}"  style="color: #ffffff;" name="{BEESCRM:$vo['post_id']}" class="talk-detail">
                <div class="talk-tag table-mode">
                    <div class="table-cell text-left"><span class="{BEESCRM:$vo['color']}"  style="padding:4px 8px;">{BEESCRM:$vo['name']}</span></div>
                    <div class="table-cell text-right">
                        <div class="action"><span><span class="iconfont icon-zan"></span>{BEESCRM:$vo['like_num']}</span><span><span class="iconfont icon-huifu"></span>{BEESCRM:$vo['reply_num']}</span></div>
                    </div>
                </div>
                <article>
                    <div class="talk-author">
                        <div class="table-mode">
                            <div class="table-cell"><img style="width: 50px;height: 50px;" src="{BEESCRM:$vo['wei']['avatar']}" class="avatar"></div>
                            <div class="table-cell">
                                <div class="nickname">   {BEESCRM:$vo['wei']['nickname']}</div>
                                <div class="time">{BEESCRM:$vo['create_time']|date="m-d H:i",###}</div>
                            </div>
                        </div>
                    </div>
                    <div class="talk-content" style="padding-top:5px;">
                        <p style="color: #000000;">{BEESCRM:$vo['content']}</p>
                        <div class="thumb clearfix">
                            <if condition="$vo['ForumPostImage'][0]['url']">
                            <img src="{BEESCRM:$vo['ForumPostImage'][0]['url']}" class="pull-left"></if>
                        	<!--<volist name="vo['ForumPostImage']" id="item">
                            <img src="{BEESCRM:$item['url']}" class="pull-left">
                            </volist>-->
                        </div>
                        <if condition="$vo['reply']">
                        <div class="reply talk-author">
                            <div class="table-mode">
                                <div class="table-cell"><img src="<if condition="$vo['reply']['sub_account_id']">{BEESCRM:$logo}<else />{BEESCRM:$vo['reply']['wei']['avatar']}</if>" class="avatar"></div>
                                <div class="table-cell">
                                    <div class="nickname"><span class="col-8"><if condition="$vo['reply']['sub_real_name']">{BEESCRM:$vo['reply']['sub_real_name']}<else />{BEESCRM:$vo['reply']['wei']['nickname']}</if></span><span class="col-2 text-right"><span class="iconfont icon-zan"></span>{BEESCRM:$vo['reply']['like_num']}</span></div>
                                    <div class="reply-content">{BEESCRM:$vo['reply']['content']}</div>
                                </div>
                            </div>
                        </div>
                        </if>
                        <if condition="$vo['count'] egt 2">
                        <div class="reply text-center reply-all">查看其余{BEESCRM:--$vo['count']}条回复</div>
                        </if>
                    </div>
                </article>
            </a>
        </section>
        </volist>
    </div>
    <if condition="$nexturl">
	<div class="loadmore">
		<a href="{BEESCRM:$nexturl}" id="more">点击查看下一页</a>
	</div>
        <else/>
        <div class="loadmore">
            <span>已经是最后一条了哦~</span>
        </div>
	</if>
</div>
<include file="Forum:commonjs"/>
<script>
    $(function(){
        FastClick.attach(document.body);
        //   点击导航
        $('.menu-btn').on('click', function () {
            $(this).toggleClass('active');
            $('.menu-list').toggleClass('active');
        });
    });
    $('.talk-menu').click(function(){
    	$('.talk-menu').show();
    });
    $('#launch').click(function(){
    	var url = '{BEESCRM::U('/base/forum/create',array('forum_id' => $forum_id))}';
    	location.href = url;
    });
</script>

</body>
</html>